module Main where

fib :: Int -> Int
fib n = fibGen 0 1 n
	
fibGen :: Int -> Int -> Int -> Int
fibGen a b n = case n of
	0 -> a
	n -> fibGen b (a + b) (n - 1)


main = do  { x <- readLn; print (fib x) }